package com.Service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.Mapper.AccountInfoMapper;
import com.Pojo.Account;
import com.Pojo.AccountInfo;
import com.Service.AccountInfo_Service;
@Service
public class AccountInfo_Service_Im implements AccountInfo_Service {
	@Autowired
	private AccountInfoMapper accountInfoMapper;
	public int insertAccountInfo(Account account) {
		AccountInfo accountInfo = new AccountInfo();
		accountInfo.setAccountid(account.getId());
		accountInfo.setCreatetime(account.getCreatetime());
		accountInfo.setNickname("用户"+account.getId());
		accountInfo.setPhone(account.getUsername());
		accountInfo.setUpdatetime(account.getUpdatetime());
		accountInfo.setCreatetime(account.getCreatetime());
		int insert = accountInfoMapper.insert(accountInfo);
		return insert;
	}
	public AccountInfo selectByCount(Integer count_id) {
		
		return accountInfoMapper.selectByCount(count_id);
	}

}
